<template>
	<!-- 返回顶部 -->
	<view :class="{istype2:tyeps==2}" class="pageScrollTobox flexc" @tap.stop="totop" style="z-index: 999999999 !important;">
		<image class="fanhuiicon" :src="photo_cdn1+'zpupload/static/icon/totop.png'" mode=""></image>
	</view>
</template>

<script>
	import config from "@/utils/config.js";
	let {staticurl,photo_cdn1} = config.baseUrl;
	export default {
		name:"pageScrollTo",
		props:{
			tyeps:{
				type:String,
				default:"1",
			}
		},
		data(){
			return{
				photo_cdn1
			}
		},
		onLoad(){
			
		},
		methods:{
			totop(){
				uni.pageScrollTo({
				    scrollTop: 0,
				    duration: 300
				});
			}
		}
	}
</script>

<style lang="scss">
	//返回顶部的组件
	.pageScrollTobox{
		position: fixed;
		
		/*#ifdef H5*/
		bottom:240upx;
		/*#endif*/
		/*#ifdef  APP-PLUS*/
		bottom:140upx;
		/*#endif*/
		
		right:24upx;
		width: 80upx;
		height: 80upx;
		//padding: 10upx;
		text-align: center;
		background: #fbfbfb;
		border-radius: 50%;
		border:1px solid #C0C0C0;
		color:#fff;
		.fanhuiicon{
			width: 60upx;
			height: 60upx;
		}
	}
	.istype2{
		/*#ifdef H5*/
		bottom:140upx;
		/*#endif*/
		/*#ifdef  APP-PLUS*/
		bottom:80upx;
		/*#endif*/
	}
</style>
